//
//  StateViewModel.m
//  safeLady
//
//  Created by Justsoso on 2017/7/6.
//  Copyright © 2017年 xmy. All rights reserved.
//

#import "StateViewModel.h"

@implementation StateViewModel

- (void)initialize
{
    [super initialize];
   
    @weakify(self)
    [[self.httpService getStatusWoman:nil] subscribeNext:^(BaseModel *model){
        @strongify(self)
        if (model.code==200) {
            [[UserClient sharedUserClient] setUserStateInfo:model.data];
            self.userStateInfo = model.data;
        }else {
            self.userStateInfo = self.viewController.userClient.userStateInfo;
//            [self.viewController hiddenHUDWithString:@"获取信息失败" error:NO];
        }
    }];
    
}

- (NSDictionary *)userStateInfo {
    if (!_userStateInfo) {
        _userStateInfo = [NSDictionary new];
    }
    return _userStateInfo;
}


@end
